<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>弹性盒子align-self的使用</title>
        <style>
            .container{
                display: -webkit-flex;
                display: -moz-flex;
                display: -ms-flex;
                display: -o-flex;
                display: flex;
                flex-wrap:wrap;
                align-content:flex-start;
                align-items:flex-start;
                justify-content: space-around;
                width: 800px;
                height: 400px;
                background-color: #ccc;
            }
            .item{
                width: 160px;
                height: 150px;
                line-height: 150px;
                text-align: center;
                font-size: 20px;
                margin: 5px;
                background-color: #fc0;
            }
            .item.end{
                align-self:flex-end;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <div class="item">1</div>
            <div class="item">2</div>
            <div class="item end">3</div>
            <div class="item">4</div>
        </div>
        <p>多轴</p>
        <div class="container">
            <div class="item">1</div>
            <div class="item">2</div>
            <div class="item">3</div>
            <div class="item">4</div>
            <div class="item">5</div>
            <div class="item">6</div>
            <div class="item">7</div>
        </div>
    </body>
</html>